#include "Game.h"



using namespace std;


/**
 * First menu displayed to the Player.
 * @param void
 * @return char - the choice of the user
 */
char Game::printMainMenu()
{
	char choice;

	cout << "-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-" << endl;
	cout << "         MAIN MENU" << endl;
	cout << "-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-" << endl << endl;
	cout << "1. [N]ew Game" << endl;
	cout << "2. [L]oad Character" << endl;
	cout << "9. [Q]uit" << endl;
	cout << endl;
	cout << "Your choice: ";
	cin >> choice;
	cout << endl;
	return choice;
}


/**
 * Change the state of the game according to the choice of the player
 * @param char choice -
 * @return void
 */
void Game::processMainMenu(char choice)
{
	switch (choice)
	{
	case '1':
	case 'n':
	case 'N':
		m_iState = GAME_STATE_NEW;
		break;
	case '2':
	case 'l':
	case 'L':
		m_iState = GAME_STATE_LOAD;
		break;
	case '9':
	case 'q':
	case 'Q':
		m_iState = GAME_STATE_QUIT;
		break;
	default:
		system("cls");
		cout << "Choice does not exist." << endl;
		break;
	}
}